package com.dhcc.mybatis.service.user.impl;

import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.dhcc.mybatis.dto.user.StudentDto;
import com.dhcc.mybatis.entity.user.Student;
import com.dhcc.mybatis.mapper.user.StudentMapper;
import com.dhcc.mybatis.service.user.StudentService;

 /**
 * <p>描述：学生信息Service实现类</p>
 * <p>公司：东华医为科技有限公司</p>
 * <p>版权：dhcc-2019</p>
 * @author liuyg
 * @since 2019-12-25
 */
@Service
public class StudentServiceImpl extends ServiceImpl<StudentMapper, Student> implements StudentService {

    @Override
    public Page<Student> list(StudentDto dto) {
        QueryWrapper<Student> qw = new QueryWrapper<Student>();
        if (null == dto.getPage()) {
			dto.setPage(new Page<>());
		}
        
        qw.select("student_id", "student_name", "create_time");
        return (Page<Student>)baseMapper.selectPage(dto.getPage(), qw);
    }

}
